<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        // Boolean 转换为布尔型   true  false 
        // 1. 代表 空、否定的值 会被转换为 false 有五种   ''、0、NaN、null、undefined  
        console.log(Boolean(''));
        console.log(Boolean(0));
        console.log(Boolean(null));
        console.log(Boolean(undefined));
        console.log(Boolean(NaN));
        // 2. 剩下的都是true 
        console.log(Boolean('12'));
        console.log(Boolean(123));
    </script>
</head>

<body>

</body>

</html>